package vip.xiaonuo.pm.modular.product.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import vip.xiaonuo.common.pojo.CommonEntity;

import java.io.Serializable;

/**
 * <p>
 * 产品表
 * </p>
 *
 * @author xhs
 * @since 2025-06-04
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName(value = "pm_product", autoResultMap = true)
public class PmProductEntity extends CommonEntity implements Serializable, TransPojo {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("ID")
    private String id;

    /**
     * 产品名称
     */
    @TableField("PRODUCT_NAME")
    private String productName;

    /**
     * 产品代码
     */
    @TableField("PRODUCT_CODE")
    private String productCode;

    /**
     * 产品负责人
     */
    @Trans(type = TransType.RPC, targetClassName = "vip.xiaonuo.sys.modular.user.entity.SysUser", fields = "name", alias = "productOwner", ref = "productOwnerName")
    @TableField("PRODUCT_OWNER")
    private String productOwner;

    /**
     * 产品负责人名称
     */
    @TableField(exist = false)
    private String productOwnerName;

    /**
     * 排序
     */
    @TableField("SORT_CODE")
    private Integer sortCode;

    /**
     * 扩展信息
     */
    @TableField("EXT_JSON")
    private String extJson;

}
